<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>3D-轮播图</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        #box{
            width: 800px;
            height: 360px;
            margin: 300px auto 0;
            box-shadow: 0 0 5px #000;
            perspective: 800px;
            position: relative;
            /*从什么角度去看*/
        }
        #box ul li{
            list-style: none;
            width: 200px;
            height: 360px;
            border:1px solid purple;
            transform-style: preserve-3d;
            transform-origin:center center;
            transition: 3s linear;
            float: left;
            position: relative;
            box-sizing: border-box;
            transform:translateZ(-180px);

        }
        #box ul li div{
            width: 200px;
            height: 360px;
            position: absolute;
        }
        #box ul li div:nth-child(1){
            left: 0;
            top: -360px;
            background: url("./img/1.png");
            transform-origin: bottom;
            background-size:200px 360px;
            transform:rotateX(90deg);
        }
        #box ul li div:nth-child(2){
            left: 0;
            top: 360px;
            transform-origin: top;
            background: url("./img/2.png");
            background-size: 200px 360px;
            transform:rotateX(-90deg);
        }
        #box ul li div:nth-child(3){
            left: 0px;
            top: 0;
            background: url("./img/3.jpg");
            background-size: 200px 360px;
            opacity: 0.5;
        }
        #box ul li div:nth-child(4){
            left: 0px;
            top: 0px;
            background: url("./img/4.png");
            background-size: 200px 360px;
            transform:translateZ(-360px);
            /*360/2=180*/
        }
        #box ul li div:nth-child(5){
            left: 200px;
            top: 0px;
            width: 360px;
            transform-origin: left;
            background: url("./img/5.jpg");
            background-size:200px 360px;
            transform: rotateY(90deg);
        }
        #box ul li div:nth-child(6){
            right: 200px;
            top: 0px;
            width: 360px;
            transform-origin: right;
            background: url("./img/6.jpg");
            background-size:200px 360px;
            opacity: 0.5;
            transform: rotateY(-90deg);
        }
        #box:hover ul li{
            transform: rotateX(180deg);
        }
    </style>
</head>
<body>
<div id="box">
    <ul>
        <li>
            <div>上</div>
            <div>下</div>
            <div>前</div>
            <div>后</div>
            <div>左</div>
            <div>右</div></li>
        <li></li>
        <li></li>
        <li></li>
    </ul>
</div>
</body>
</html>